#include "comm/znx_hooks.h"

static znx_bool_t hook1(void *data)
{
    DD("hook1");
    return ZNX_TRUE;
}

static znx_bool_t hook2(void *data)
{
    DD("hook2");
    return ZNX_TRUE;
}

static znx_bool_t hook3(void *data)
{
    DD("hook3");
    return ZNX_TRUE;
}

static znx_bool_t hook4(void *data)
{
    DD("hook4");
    return ZNX_TRUE;
}

static znx_bool_t hook5(void *data)
{
    DD("hook5");
    return ZNX_TRUE;
}

static znx_bool_t hook6(void *data)
{
    DD("hook6");
    return ZNX_TRUE;
}

static znx_bool_t hook7(void *data)
{
    DD("hook7");
    return ZNX_FALSE;
}

static znx_bool_t hook8(void *data)
{
    DD("hook8");
    return ZNX_TRUE;
}


int main()
{
    znx_hooks_t *hooks = znx_hooks_create();
    znx_hooks_add(hooks, hook1);
    znx_hooks_add(hooks, hook2);
    znx_hooks_add(hooks, hook3);
    znx_hooks_add(hooks, hook4);
    znx_hooks_add(hooks, hook5);
    znx_hooks_add(hooks, hook6);
    znx_hooks_add(hooks, hook7);
    znx_hooks_add(hooks, hook8);

    assert(!znx_hooks_exec(hooks, NULL));

    znx_hooks_destroy(hooks);
}